<style>
.headinfo {
    background: none;
}
.headinfo .mod-member {
    margin: 0 auto;
	margin-top: -60px;
    width: 94%;
	left:3%;
    padding: 6px 0 10px;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #f2f2f2;
}
.headinfo .mod-member .sign-btn{
    position: absolute;
    margin: 0 auto;
	top: -44px;
    width: 36px;
	height: 26px;
	right:16px;
    color:#fff;
	text-align:center;
	padding-top:3px;
    background: #7c1cc9;
}
.bottombg {bottom:-20px;width:100%;height:80px;border-bottom-right-radius:100% 40px;border-bottom-left-radius:100% 40px;}
.mod-group {
    margin: 0 auto;
	margin-top: 5px;
    width: 94%;
    background-color: #fff;
    border-radius: 10px;
    border: 1px solid #f2f2f2;
}
.fui-icon-group .fui-icon-col-sm {
    margin:10px 0;
}
.badge {
    left: 2rem;
    top: 0;
}
</style>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='main'">
	<div class='fui-content member-page'>
		<div class="bottombg" style="background:#18bc9c;"></div>
		<div class="headinfo" style="height:auto;">		
				<div class="mod-member">
					<div class="sign-btn" href="javascript:;" ng-click="access_json('core/member.qiandao/')" style="background:#18bc9c;">签到</div>
						<div class="headinfo" style="background:none;padding:0;color:#999">
												<div class="child userinfo" style="padding-bottom:5px;color:#999;width:4rem">
													<div class="face" style="margin-right:0.6rem;padding: 0.1rem;" href="javascript:;" ng-click="access_json('core/member.cavatar/')">
															<img ng-src="{{tomedia(pagedata.item.avatar) || '../core/resource/images/gw-user.png'}}" />
															<span class="vip" style="top: 2rem;background: {{main.syscolor || '#4491F1'}} none repeat scroll 0 0;"><i class="icon icon-vip5" style="font-size:0.5rem;padding-left:0.1rem"></i></span>
													</div>
												</div>
												<div class="child userinfo" style="padding-bottom:0;color:#999;flex: 1;text-align:left;">
													<div class="l bold" style="width:100%">{{pagedata.item.nickname}} </div>
													<div class="l">
														<div style="width:100%;font-size:12px">手机: {{pagedata.item.mobile}}</div>
														<div class="btn btn-sm btn-default-o" href="javascript:;" ng-click="pagedata.showrecharge=true;pagedata.post.type=3" style="margin-top:0;padding:0 0.5rem;background:none;width:auto;border: 1px solid #333;color:#333">充值金币</div>
													</div>
												</div>
									
						</div>
					</div>
		</div>
		<div ng-if="pagedata.setting.no_myfee!=1" class="fui-cell-group fui-cell-click mod-group" style="margin-top:0.5rem">
							<a class="fui-cell external" href="javascript:;" ng-click="access_json('core/member.xunibi/')">
								<div class="fui-cell-text bold">我的钱包</div>
								<div class="fui-cell-remark" style="font-size: 0.65rem;">查看我的钱包</div>
							</a>
							<div class="fui-icon-group col-4 selecter">
								<div ng-repeat="(key,item) in pagedata.credit_types" class="fui-icon-col-sm external" style="margin:0">
									<div ng-click="access_json('core/member.xunibi//type='+key)">
										<div class="text bold" style="color:{{main.syscolor || '#7c1cc9'}}">{{item.fee || '0.00'}}</div>
										<div class="subtitle" style="font-size:12px;color: #666;">{{item.title}} <span style="color:{{main.syscolor || '#4491F1'}}">查看</span></div>
									</div>
								</div>
							</div>
		</div>
		<div style="padding:0.5rem 0.6rem">
					<div class="fui-cell-group" style="margin-top:0">
						<div class="fui-cell" href="javascript:;" ng-click="access_json('jy_aikefu/worker_home/')">
							<div class="fui-cell-text bold" style="width: auto;">
								平台客服入口
							</div>
							<div class="fui-cell-remark">进入</div>
						</div>
						<div ng-if="pagedata.pluginset.ismerch==1" class="fui-cell" href="javascript:;" ng-click="access_json('jy_aikefu/worker_home//ismerch=1')">
							<div class="fui-cell-text bold" style="width: auto;">
								商户客服入口
							</div>
							<div class="fui-cell-remark">进入</div>
						</div>
						<div ng-repeat="item in pagedata.setting.homenav" class="fui-cell" href="javascript:;" ng-click="access_json(item.action)">
							<div class="fui-cell-text bold">{{item.title}}</div>
							<div class="fui-cell-remark">进入</div>
						</div>
						<div class="fui-cell" >
							<div class="fui-cell-label bold" style="width: auto;">
								我的对话记录
							</div>
							<div class="fui-cell-text">
							</div>
						</div>
						<div class="fui-list-group order-item" ng-repeat="item in pagedata.list">
							<div class="fui-list external" style="padding: 0.42rem 0.5rem" data-nocache="true">
								<div class="fui-list-inner">
									<div class="subtitle"> 对话号: {{item.ordersn}}</div>
								</div>
								<div class="row-remark text-cancel" style="font-size: 0.65rem;text-align: right;">{{item.statustitle}}</div>
								<div class="angle"></div>
							</div>
							<div style="padding:0 0.5rem">
							 <div class="fui-cell-group" style="padding:0.5rem;border-radius:0.5rem;border: 1px solid #eee;background:#f6faf9">
											<div class="fui-cell" style="padding:0">
												<div class="fui-cell-label" style="width:2.3rem;">
													<img style="border-radius: 50%;width:2rem;height:2rem" ng-src="{{tomedia(item.worker.logo) || '../addons/jy_aikefu/resource/images/avatar.png'}}" />
												</div>
												<div class="fui-cell-info" style="font-size:0.7rem;">
													<div class="bold">{{item.worker.title}}</div>
													<div class="subtitle" style="font-size:0.6rem">{{item.worker.api_data.jidesc||item.worker.subtitle}}</div>
													<div style="padding:0.3rem 0;font-size:0.6rem">
														<span class="bold syscolor"><i class="icon icon-shoucang-tianchong" style="font-size:0.6rem"></i> {{item.worker.star || '5.0'}}</span>
														<i class="icon icon-zuoshuangxiexian" style="color:#f2f2f2"></i>
														<span class="gray">咨询量 <span class="bold syscolor">{{item.worker.salenum}}</span></span>
														<i class="icon icon-zuoshuangxiexian" style="color:#f2f2f2"></i>
														<span class="gray">平均响应 <span class="bold syscolor">{{item.worker.api_data.uptime || '1小时'}}</span></span>
													</div>
													<div style="position: relative;width:100%;overflow-y: hidden;">
													<div class="fui-tab-scroll" style="height: auto">
														 <a ng-repeat="t in item.worker.tags" class="btn btn-default btn-sm"> {{t.title}} </a>
													</div>
													</div>
												</div>
											</div>		
							</div>
							</div>
							<div class="title" style="padding:0.2rem 0.5rem">
									<div ng-if="item.grouptitle"><i class="icon icon-f13" style="font-size: 0.65rem"> 类型：<span class="price red">{{item.grouptitle}}</span></i></div>
									<div><i class="icon icon-shijian" style="font-size: 0.65rem"> 时间：{{item.createtime}}</i></div>
							</div>
							<div class="fui-list-group-title lineblock opblock">
								<span class="status noremark">
									<div ng-show="item.status == 0" class="btn btn-sm btn-default-o order-delete" href="javascript:" ng-click="post({},'del','id='+item.id)">删除对话</div>
									<div ng-show="item.status == 1 || item.status == 2" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="access_json('/tcplog//id='+item.id)">前往咨询</div>
									<div ng-show="item.status == 3 && item.status >4" class="btn btn-sm btn-default-o order-finish" href="javascript:" ng-click="access_json('/tcplog//id='+item.id)">查看咨询</div>
									<div ng-show="item.ispay == 0 && item.status == 0" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="pagedata.pay(item.id)">支付对话</div>
									<div ng-show="item.status == 2" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'receive','id='+item.id,'','确定已经完成本次咨询了？')">完成咨询</div>
									<div ng-show="item.status == 3" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="access_json('/comment/commentorder/id='+item.id)">评价</div>
								</span>
							</div>
					</div>
					</div>
				</div>
				<div ng-include="sys_html('common/_copyright',true)"></div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.geturl='jy_aikefu/mytcp/list/';
scope.tool.get_list(scope.pagedata.geturl,true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list(scope.pagedata.geturl);
}
</script>
<div ng-if="pagedata.showrecharge" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff;}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showrecharge=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 1rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行【{{pagedata.typetitle || '金币'}}】充值操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-dixiaofei" style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'>
					<input type='text' class='fui-input' placeholder="充值额度" ng-change="pagedata.upfee()" ng-model="pagedata.post.jifen">
					</div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<div class="c" style="font-size:0.6rem;margin-top:-0.3rem;color:#fff">
						需支付：￥{{pagedata.post.fee || 0}} （充值比例：{{pagedata.jifen_rate}}比1）						
				</div>
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="pagedata.recharge()">确认充值</a>
			</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.upfee=function(){
	scope.pagedata.post.fee=(scope.pagedata.post.jifen/scope.pagedata.jifen_rate).toFixed(2);
}
scope.pagedata.recharge=function(){
	scope.pagedata.post.type=3
	scope.post_json('jy_aikefu/myhome/recharge/',scope.pagedata.post,function(pay_id){
		var success_url='/myhome//type='+scope.pagedata.post.type;
		scope.tool.pay(pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success',success_url);
				}else{
					scope.message('支付失败！','success',success_url);
				}
		},'','',success_url,success_url);
	});
}
</script>